From: shand@ubuntu.eng.hq.xensource.com Date: Tue, 13 Sep 2005 18:03:04 +0000 (-0800) Subject: Some more resilience to errors in creating vbds etc; still needs more work X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16806^2~31 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1f0c99978fcd9fa3f17717292fd84cc99a7a3aa4;p=xen.git Some more resilience to errors in creating vbds etc; still needs more work to tidy up things properly (e.g. the store state). Signed-off-by: Steven Hand --- diff --git a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c index 17760646ab..bf9817a8f0 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c @@ -170,6 +170,7 @@ static void backend_changed(struct xenbus_watch *watch, const char *node) be->blkif = alloc_blkif(be->frontend_id); if (IS_ERR(be->blkif)) { + /* XXX SMH: should free blkif here... hmm */ err = PTR_ERR(be->blkif); be->blkif = NULL; xenbus_dev_error(dev, err, "creating block interface"); @@ -178,6 +179,8 @@ static void backend_changed(struct xenbus_watch *watch, const char *node) err = vbd_create(be->blkif, handle, be->pdev, be->readonly); if (err) { + /* XXX SMH: should free blkif here too... */ + be->blkif = NULL; xenbus_dev_error(dev, err, "creating vbd structure"); return; }